//
//  PYDetailLabelCell.m
//  IHome
//
//  Created by Jim on 2019/4/6.
//  Copyright © 2019 com.zhujizheng. All rights reserved.
//

#import "PYDetailLabelCell.h"

@implementation PYDetailLabelCell

+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    PYDetailLabelCell *cell = [tableView dequeueReusableCellWithIdentifier:@"detailLabelCellid"];
    if (!cell) {
        cell = [[PYDetailLabelCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"detailLabelCellid"];
    }
    cell.textLabel.font = PY_Font_Regular(17);
    cell.textLabel.textColor = PY_Dark_Color;
    cell.textLabel.textAlignment = NSTextAlignmentLeft;
    cell.detailTextLabel.font = PY_Font_Regular(17);
    cell.accessoryType = UITableViewCellAccessoryNone;
    return cell;
}

- (void)updatePointPosition
{
    if (self.detailTextLabel.text.length > 0) {
        [self.pointView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.detailTextLabel.mas_right);
            make.centerY.mas_equalTo(self.detailTextLabel);
            make.size.mas_equalTo(CGSizeMake(10, 10));
        }];
    }
}
@end
